<template>
	<j-cell-group>
		<j-cell title="启用高速录像下载" :more="false">
			<view slot="tips">
				<switch :checked="NetWorkNetCommon.UseHSDownLoad" disabled></switch>
			</view>
		</j-cell>
		<j-cell title="网关" :tips="NetWorkNetCommon.GateWay" :more="false"></j-cell>
		<j-cell title="主机IP" :tips="NetWorkNetCommon.HostIP" :more="false"></j-cell>
		<j-cell title="主机名" :tips="NetWorkNetCommon.HostName" :more="false"></j-cell>
		<j-cell title="端口" :tips="NetWorkNetCommon.HttpPort" :more="false"></j-cell>
		<j-cell title="物理地址" :tips="NetWorkNetCommon.MAC" :more="false"></j-cell>
		<j-cell title="限定码流值" :tips="NetWorkNetCommon.MaxBps" :more="false"></j-cell>
		<j-cell title="监视协议" :tips="NetWorkNetCommon.MonMode" :more="false"></j-cell>
		<j-cell title="SSL侦听端口" :tips="NetWorkNetCommon.SSLPort" :more="false"></j-cell>
		<j-cell title="子网掩码" :tips="NetWorkNetCommon.Submask" :more="false"></j-cell>
		<j-cell title="最大连接数" :tips="NetWorkNetCommon.TCPMaxConn" :more="false"></j-cell>
		<j-cell title="TCP侦听端口" :tips="NetWorkNetCommon.TCPPort" :more="false"></j-cell>
		<j-cell title="传输策略" :tips="NetWorkNetCommon.TransferPlan" :more="false"></j-cell>
		<j-cell title="UDP侦听端口" :tips="NetWorkNetCommon.UDPPort" :more="false"></j-cell>
		<j-cell title="设备号" :tips="NetWorkNetCommon.DeviceID" :more="false"></j-cell>
	</j-cell-group>
</template>

<script>
export default {
    data() {
        return {
            token: '',
            NetWorkNetCommon: {
                UseHSDownLoad: '',
                GateWay: '',
                HostIP: '',
                HostName: '',
                HttpPort: '',
                MAC: '',
                MaxBps: '',
                MonMode: '',
                SSLPort: '',
                Submask: '',
                TCPMaxConn: '',
                TCPPort: '',
                TransferPlan: '',
                UDPPort: '',
                DeviceID: ''
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
		this.token = options.token
		this.getconfig();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        getconfig() {
            uni.showLoading();
            let token = this.token;
            let data = {
                Name: 'NetWork.NetCommon'
            };
            getApp().globalData.api.getconfig(data, token, (result) => {
                uni.hideLoading({
                    success: (res) => {
                        console.log(result);
                        this.NetWorkNetCommon = result['NetWork.NetCommon']
                    }
                });
            });
        }
    }
};
</script>
<style></style>
